﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using Acaweb.Common;
using Acaweb.Model.Entities;
using Acaweb.Model.Entities.DatosCompuestos;
using Acaweb.Servicios.Contracts;
using System.ServiceModel.Activation;
using Components = Acaweb.Componentes.Contracts;

namespace Acaweb.Servicios.Services
{
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class EmpresasService : IEmpresasService
    {
        Components.IEmpresasService _EmpresasComponent = AppCtx.Resolve<Components.IEmpresasService>();

        public List<Empresas> GetAll()
        {
            return _EmpresasComponent.GetAll().ToList();
        }

        public Empresas GetById(string NIT)
        {
            return _EmpresasComponent.GetById(NIT);
        }

        public void Insert(Empresas Empresa)
        {
            _EmpresasComponent.Insert(Empresa);
        }

        public void Update(Empresas Empresa)
        {
            _EmpresasComponent.Update(Empresa);
        }
    }
}